doc: fix code formatting
authorTshepang Lekhonkhobe <tshepang@gmail.com>
Thu, 1 Dec 2016 20:08:59 +0000 (22:08 +0200)
committerTshepang Lekhonkhobe <tshepang@gmail.com>
Fri, 2 Dec 2016 01:22:57 +0000 (03:22 +0200)
src/cargo/util/network.rs

index 4bc12b7b4e677be9f6b8e6003e7c83485b1f2432..e5f22a1c388d2bb32d00d489232d56eb83ae5e80 100644 (file)
@@ -2,14 +2,17 @@ use util::{CargoResult, Config, errors};
 
 /// Wrapper method for network call retry logic.
 ///
-/// Retry counts provided by Config object 'net.retry'. Config shell outputs
+/// Retry counts provided by Config object `net.retry`. Config shell outputs
 /// a warning on per retry.
 ///
 /// Closure must return a CargoResult.
 ///
-/// Example:
+/// # Examples
+///
+/// ```ignore
 /// use util::network;
 /// cargo_result = network.with_retry(&config, || something.download());
+/// ```
 pub fn with_retry<T, E, F>(config: &Config, mut callback: F) -> CargoResult<T>
     where F: FnMut() -> Result<T, E>,
           E: errors::NetworkError